<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	$item=$this->plugin_setting('saleset');
	$return['item']=$item;
	$htmls=array(
		'type'=>'edit',
		'post'=>'set',
		'desc'=>'满额包邮',
		'edit'=>array(
			array('type'=>'switch','name'=>'baoyou_status','title'=>'满额包邮'),
			array('type'=>'string','name'=>'baoyou_man','title'=>'单笔订单满（元）','show'=>array('baoyou_status'=>1)),
			//array('type'=>'switch','name'=>'status','title'=>'不参与包邮商品'),	
		)
	);
	$return['htmls']=$htmls;	
	exi($return);
}
if($_RQ['op']=='set'){
	$post=get_postdata();
	if($post['baoyou_status'] && !$post['baoyou_man']){
		exi('请设置满额数字！','error');
	}
	$this->plugin_setting('saleset',$post);
	exi('设置成功');
}